This week in Flutter #44: Some words on testing in Flutter
I have been reading quite some articles about testing in Flutter lately. Dhruv Nakum and Guillaume Bernos are writing about it in this issue. Testing is an often overlooked part of programming: if only we tested more, many bugs would not even reach production.
I do not believe in 100% code coverage: it gives you a false sense of security, and getting from 90% to 100% might not be the best way to allocate your time or budget. Even so, I must say I do not spend as much time as I would want on designing and writing tests. I hope these readings will help me improve my testing skills.
I wonder when we will move from automating tests to automating the writing of those tests.
Do you reach 100% code coverage in all your Flutter projects? Let me know in the comment section below.
- Michele Volpato
Development ๐งโ๐ป
๐ Flutter, add an undo feature
When I first read the title of this article, I thought it was about adding a ctrl+z
feature to a Flutter app.
It is not. It’s about giving the possibility to your users to stop an action they performed in your
app before it’s too late. For instance, canceling a message they just sent. Pierre Monier
also gives you a solution for when the app gets killed while the message is in this cancelable limbo.
๐ Testing In Flutter
Dhruv Nakum published a series of articles on testing in Flutter. There is an article about unit testing, one about widget testing, and, finally, one about integration testing. They are good getting-started articles if you are starting your testing journey just now.
๐ Debouncing in Flutter and how to test it
A short article about avoiding too many events in Flutter. Written by Yong Shean.
Tools ๐
๐ Reduce your Flutter CI cost easily!
If you have a lot of tests in your Flutter app test suite, and you run tests on each push, it can become expensive to use a “cloud” continuous integration tool. Guillaume Bernos had exactly this problem, and in this article, he explains what he did to reduce costs by allowing some small differences in goldens.
Others ๐คทโโ๏ธ
๐ DropdownButton (Widget of the Week) ๐ฆ
New episode of Widget of the Week. Khanh Nguyen introduces
DropdownButton
and how you can easily customize it.
That’s it for this week.
If you want to comment on any of this week’s entries, you can do it in the comment section below.
Have a bug-free week,
- Michele Volpato
Leave a comment